﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ReportInventoryAgingW.aspx.cs"
    Inherits="sWarranty.WEB.ReportInventoryAgingW" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register Src="../UC/Header.ascx" TagName="Header" TagPrefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <link rel="stylesheet" type="text/css" href="../CSS/table.css" />
    <link rel="stylesheet" type="text/css" href="../CSS/Menu.css" />
    <link href="http://code.jquery.com/ui/1.9.1/themes/base/jquery-ui.css" rel="stylesheet"
        type="text/css" />
    <script src="../JS/jquery-1.8.2.js" type="text/javascript"></script>
    <script src="../JS/jquery-ui.js" type="text/javascript"></script>
    <script src="../JS/Menu.js" type="text/javascript"></script>
    <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
    <script src="../JS/weekly_calendar/weeklycalendar.js" type="text/javascript"></script>
    <link href="../JS/weekly_calendar/calendar.css" rel="stylesheet" type="text/css" />
    <link href="../JS/chosen-master/chosen/chosen.css" rel="stylesheet" type="text/css" />
    <script src="../JS/chosen-master/chosen/chosen.jquery.js" type="text/javascript"></script>
    <script src="../JS/jquery.stickytableheaders.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#txtFromDate").attr('readOnly', 'true');
            $("#txtToDate").attr('readOnly', 'true');
            $("table").stickyTableHeaders();
            SetLogger();
        });

        buildWeeklyCalendar(1);

    </script>
    <style type="text/css">
        .style1
        {
            width: 176px;
        }
    </style>
    <script src="../JS/jquery.qtip-1.0.0-rc3.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $('#btnExcel').qtip({
                content: 'You should un-group Grid data first to view raw data.',
                show: 'mouseover',
                hide: 'mouseout',
                position: {
                    corner: {
                        target: 'topMiddle',
                        tooltip: 'bottomLeft'
                    }
                },
                style: {
                    name: 'dark' // Inherit from preset style
                }

            })
        });

       
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ksdjfl" runat="server">
    </asp:ScriptManager>
    <uc1:Header ID="Header1" runat="server" />
    <div class="Mid">
        <div class="Mid1">
            <div id="DataContent">
                <%-- <div>
                    Nội dung bên trái
                </div>--%>
                <div>
                    <div class="TitleTab">
                        <ul>
                            <li><a href="ReportInventoryAgingD.aspx">Daily</a></li>
                            <li><a href="ReportInventoryAgingW.aspx" class="TitleTab_act">Weekly</a></li>
                            <li><a href="ReportInventoryAgingM.aspx">Monthly</a></li>
                        </ul>
                    </div>
                    <!-- DataGrid Start -->
                    <div class="Search">
                        <table>
                            <tr>
                                <td style="background-color: #F7F7F7">
                                    Period :
                                </td>
                                <td>
                                    <asp:DropDownList ID="dropYear" runat="server" Width="50%" CssClass="chzn-select"
                                        data-placeholder="..Year..">
                                        <asp:ListItem Value="2012" Text="2012"></asp:ListItem>
                                        <asp:ListItem Value="2013" Text="2013"></asp:ListItem>
                                        <asp:ListItem Value="2014" Text="2014"></asp:ListItem>
                                        <asp:ListItem Value="2015" Text="2015"></asp:ListItem>
                                        <asp:ListItem Value="2016" Text="2016"></asp:ListItem>
                                        <asp:ListItem Value="2017" Text="2017"></asp:ListItem>
                                        <asp:ListItem Value="2018" Text="2018"></asp:ListItem>
                                        <asp:ListItem Value="2019" Text="2019"></asp:ListItem>
                                        <asp:ListItem Value="2020" Text="2020"></asp:ListItem>
                                    </asp:DropDownList>
                                    <asp:DropDownList ID="dropMonth" runat="server" Width="50%" CssClass="chzn-select"
                                        data-placeholder="..Month..">
                                        <asp:ListItem Value="01" Text="JAN"></asp:ListItem>
                                        <asp:ListItem Value="02" Text="FEB"></asp:ListItem>
                                        <asp:ListItem Value="03" Text="MAR"></asp:ListItem>
                                        <asp:ListItem Value="04" Text="APR"></asp:ListItem>
                                        <asp:ListItem Value="05" Text="MAY"></asp:ListItem>
                                        <asp:ListItem Value="06" Text="JUN"></asp:ListItem>
                                        <asp:ListItem Value="07" Text="JUL"></asp:ListItem>
                                        <asp:ListItem Value="08" Text="AUG"></asp:ListItem>
                                        <asp:ListItem Value="09" Text="SEP"></asp:ListItem>
                                        <asp:ListItem Value="10" Text="OCT"></asp:ListItem>
                                        <asp:ListItem Value="11" Text="NOV"></asp:ListItem>
                                        <asp:ListItem Value="12" Text="DEC"></asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                                <td style='width: 10px'>
                                </td>
                                <td style="background-color: #F7F7F7">
                                    Product
                                </td>
                                <td class="style1">
                                    <asp:DropDownList ID="dropAu" runat="server" Width="100%" CssClass="chzn-select"
                                        data-placeholder="..All..">
                                    </asp:DropDownList>
                                </td>
                                <td style='width: 10px'>
                                </td>
                                <%--<td style="background-color: #F7F7F7">
                                    &nbsp;</td>
                                <td>
                                    &nbsp;</td>
                                <td style='width: 10px'>
                                    </td>--%>
                                <td>
                                    &nbsp;
                                </td>
                            </tr>
                            <tr>
                                <td style="background-color: #F7F7F7">
                                    BillTo Code:
                                </td>
                                <td>
                                    <asp:TextBox ID="txtBillCode" runat="server" Width="100%"></asp:TextBox>
                                </td>
                                <td style='width: 10px'>
                                </td>
                                <td style="background-color: #F7F7F7">
                                    Model:
                                </td>
                                <td class="style1">
                                    <asp:TextBox ID="txtModel" runat="server" Width="100%"></asp:TextBox>
                                </td>
                                <td style='width: 10px'>
                                </td>
                                <%--<td style="background-color: #F7F7F7">
                                    </td>
                                <td>
                                    &nbsp;
                                </td>
                                <td>
                                    &nbsp;</td>--%>
                                <td>
                                    <asp:Button ID="btnExcel" runat="server" OnClick="btnExcel_Click" Width="80px" CssClass="button Float-right"
                                        Text="Export" />
                                    <asp:Button ID="btnFind" runat="server" CssClass="button Float-right" Width="80px"
                                        Text="Search" OnClick="btnFind_Click" />
                                </td>
                            </tr>
                        </table>
                    </div>
                    <div id="divScroll" style="overflow: auto;">
                        <telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" CellSpacing="0" AutoGenerateColumns="false"
                            OnColumnCreated="RadGrid1_ColumnCreated" CssClass="RadGridCustomClass" GridLines="None"
                            ShowGroupPanel="True" OnNeedDataSource="RadGrid1_NeedDataSource" BorderWidth="1"
                            OnGroupsChanging="RadGrid1_GroupsChanging" Skin="Office2007" onitemdatabound="RadGrid1_ItemDataBound">
                             <ClientSettings AllowColumnsReorder="True" AllowDragToGroup="True" ReorderColumnsOnClient="True">
                            </ClientSettings>
                            <MasterTableView ShowGroupFooter="true" AllowMultiColumnSorting="true" >
                                <PagerStyle AlwaysVisible="True" />
                                <Columns>
                                    <telerik:GridBoundColumn Aggregate="Custom" DataField="BILL_TO" HeaderText="BILL_TO" FooterText="Total">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="BILL_NAME" HeaderText="BILL_NAME" SortExpression="BILL_NAME"  UniqueName="BILL_NAME">
                                    </telerik:GridBoundColumn>
                                     <telerik:GridBoundColumn DataField="PRODUCT" HeaderText="PRODUCT" SortExpression="PRODUCT" UniqueName="PRODUCT">
                                    </telerik:GridBoundColumn>
                                     <telerik:GridBoundColumn DataField="MODEL" HeaderText="MODEL" SortExpression="MODEL" UniqueName="MODEL">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn Aggregate="Sum" HeaderStyle-HorizontalAlign="Right" ItemStyle-HorizontalAlign="Right"  DataField="STOCK" HeaderText="STOCK" FooterText=" ">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn Aggregate="Sum" HeaderStyle-HorizontalAlign="Right" ItemStyle-HorizontalAlign="Right"  DataField="INVENTORY" HeaderText="INVENTORY" FooterText=" ">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn Aggregate="Sum" HeaderStyle-HorizontalAlign="Right" ItemStyle-HorizontalAlign="Right"  DataField="ACM" HeaderText="ACM" FooterText=" ">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn Aggregate="Sum" HeaderStyle-HorizontalAlign="Right" ItemStyle-HorizontalAlign="Right"  DataField="W1" HeaderText="W1" FooterText=" ">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn Aggregate="Sum" HeaderStyle-HorizontalAlign="Right" ItemStyle-HorizontalAlign="Right"  DataField="W2" HeaderText="W2" FooterText=" ">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn Aggregate="Sum" HeaderStyle-HorizontalAlign="Right" ItemStyle-HorizontalAlign="Right"  DataField="W3" HeaderText="W3" FooterText=" ">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn Aggregate="Sum" HeaderStyle-HorizontalAlign="Right" ItemStyle-HorizontalAlign="Right"  DataField="W4" HeaderText="W4" FooterText=" ">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn Aggregate="Sum" HeaderStyle-HorizontalAlign="Right" ItemStyle-HorizontalAlign="Right"  DataField="W5" HeaderText="W5" FooterText=" ">
                                    </telerik:GridBoundColumn>
                                </Columns>
                                <GroupByExpressions>
                                    <telerik:GridGroupByExpression>
                                        <GroupByFields>
                                            <telerik:GridGroupByField FieldName="BILL_TO"></telerik:GridGroupByField>
                                        </GroupByFields>
                                        <SelectFields>
                                            <telerik:GridGroupByField FieldName="BILL_TO" HeaderText="BILL_TO"></telerik:GridGroupByField>
                                        </SelectFields>
                                    </telerik:GridGroupByExpression>
                                </GroupByExpressions>
                            </MasterTableView>
                            <GroupingSettings ShowUnGroupButton="true"></GroupingSettings>
                        </telerik:RadGrid>
                    </div>
                    <!-- DataGrid End -->
                </div>
            </div>
            <div class="Clear_both">
            </div>
        </div>
    </div>
    <script type="text/javascript">
        $(".chzn-select").chosen();
    </script>
    </form>
</body>
</html>
